<div class="photos_recommend">
	<h2><a href="">Ảnh đẹp Eva</a></h2>
	<div class="sort"><a href="#" class="active">Tuần</a></div>
	<div class="photoItems clearfix">
		<?php
			$this->post_model->list_where = 'published = 1 AND type = 1';
			$this->post_model->list_orderby = array('rand()');
			$items = $this->post_model->getList(5);
			foreach($items as $itm):
				$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
		?>
			<div class="item">
				<div class="photoImage">
					<a href="<?= $link ?>"><img alt="<?= html_escape($itm->title) ?>" src="<?= thumb($itm->image, 286, 201) ?>" /></a>
				</div>
				<div class="photoText">
					<h3><a href="<?= $link ?>"><?= $itm->title ?></a></h3>
				</div>
			</div>
		<?php endforeach ?>
	</div><!-- photoItems -->
</div><!-- photos_recommend -->

<div class="videos_recommend">
	<?php $videos_recommend = $this->category_model->get(24); ?>
	<h2><a href="<?= siteUrl('post/index/'.$videos_recommend->id) ?>">Xem gì ở đâu</a></h2>
	<div class="videoItems clearfix">
	<?php
		$child_ids = $videos_recommend->child;
		if(!$child_ids)
		{
			$child_ids = array();
		}
		$child_ids[] = $videos_recommend->id;

		$this->post_model->list_where = 'hot >= 1 AND type != 2 AND published = 1 AND category_id IN ( '.implode(', ', $child_ids).' )';
		$this->post_model->list_orderby = array('rand()');
		$items = $this->post_model->getList(6);
		foreach($items as $k=>$itm):
			$link = siteUrl('post/detail/'.$itm->id.'-'.$itm->alias, $itm->category_id);
	?>
		<?php if($k==0): ?>
			<div class="big_video">
				<div class="photoImage">
					<a href="<?= $link ?>">
						<img alt="<?= html_escape($itm->title) ?>" src="<?= thumb($itm->image, 286, 201) ?>" />
					</a>
				</div>
				<div class="photoText">
					<h3><a href="<?= $link ?>"><?= $itm->title ?></a></h3>
				</div>
			</div>
			<div class="videoMore">
				<div class="videoMoreTitle">Xem thêm</div>
				<ul>
		<?php else: ?>
					<li><a href="<?= $link ?>"><?= $itm->title ?></a></li>
		<?php endif ?>
	<?php endforeach ?>
				</ul>
			</div>
	</div>
</div><!-- videos_recommend -->


{if $module=='home' || $module==''}
<div class="qc qc_29">{get_ads id=29}</div>
{/if}

